package com.xinqizhi.service.impl;

import com.xinqizhi.entity.XqzClassList;
import com.xinqizhi.mapper.XqzClassListMapper;
import com.xinqizhi.service.XqzClassListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class XqzClassListServiceImpl implements XqzClassListService {
    @Autowired
    private XqzClassListMapper classListMapper;
    /**
     * 根据班级ID查询班级
     *
     * @param clsID
     * @return
     */
    @Override
    public XqzClassList getData(Integer clsID) {
        List<XqzClassList> data = classListMapper.getData(clsID);
        return data.get(0);
    }

    /**
     * 查询所有班级信息
     *
     * @param xqzClassList
     * @return
     */
    @Override
    public List<XqzClassList> getAllData(XqzClassList xqzClassList) {
        List<XqzClassList> data = classListMapper.getAllData(xqzClassList);
        return data;
    }

    /**
     * 添加一个班级
     *
     * @param xqzClassList
     * @return
     */
    @Override
    public Integer insertSelectData(XqzClassList xqzClassList) {
        return null;
    }

    /**
     * 修改一个班级
     *
     * @param xqzClassList
     * @return
     */
    @Override
    public Integer updateData(XqzClassList xqzClassList) {
        return classListMapper.updateData(xqzClassList);
    }

    /**
     * 删除一个班级
     *
     * @param clsID
     * @return
     */
    @Override
    public Integer deleteData(Integer clsID) {
        return null;
    }

    /**
     * 批量删除班级
     *
     * @param split
     * @return
     */
    @Override
    public Integer deleteBatchData(String[] split) {
        return null;
    }
}
